README File for:

"Understanding the Impact of the 2018 Voter ID Pilots on Turnout at the London Local Elections: 
A Synthetic Difference-in-Difference Approach"

Political Science Research and Methods

Tom Barton, King's College, London (ORCID: 0000-0002-3649-022X)

January 3, 2025

___________________________

Instructions:

1. Download files in the original zip format to preserve file structure.
2. Create an R project in the main directory 
3. If necessary, install the librarian package (for package management)
4. To replicate the entire analysis, run the entirety of 000_master.R.
5. A log of all replication outputs is given in logfile.txt 

___________________________

List of replication files (alphabetical order):

- 000_master.R: Master replication file, runs all code necessary to replicate all findings in the paper
- README.txt: This file
- replication_log.txt: Log of outputs from replication process
- code:
	- 001_ward_level_cleaning.R:   Cleans ward level data. 
	- 002_ward_analysis.R:         Conducts all analysis for ward level data and produces figures and tables.
	- 003_aggregate_analysis.R:    Conducts all analysis for borough level data and produces figures and tables. 
	- 004_online_appendix.R:       Produces all material within the online appendix.

- data:
	- brorough-election-turnout-2010.tab:   Ward level turnout for 2010 elections.
	- brorough-election-turnout-2006.tab:   Ward level turnout for 2006 elections.    
	- borough_trnt.tab:                     Borough level turnout by year.
	- eco_act.tab                           Economic activity level (proportions) by ward.
	- full_com_agg.tab:                     Borough level socio-demographic charateristics.
	- per_minority.tab:                     Ethnicity (proportions) by ward.
	- social_grade.tab:                     Proportion of social grade by ward.
	- uk_2002_loc.tab:                      Ward level turnout for 2002.
	- uk_2014_loc.csv:                      Ward level turnout for 2014.
	- uk_2018_loc.tab:                      Ward level turnout for 2018.
	- ward_full.csv:                        Combined ward level turnout for all years.

- figures:
	- trnt_plot.png:  Figure 2
	- wild_boot_plt.png:  Figure 3
	- ife_plt.png: Figure 4
	- agg_mods.png: Figure 6
	- late_mods.png: Figure 7
  - hetro_plt.png: Figure A.1
	- esti_plot.png: Figure A.2
	- pla.boot.plt.png: Figure A.3
	- pla.error_rm.png: Figure A.4
		
- tables:
	- time_weights_agg.tex: Table 3
	- weights_agg.Rmd: Table 4
	- demo_props.Rmd: Table A.1
___________________________

Note 1: The replication was done with RStudio version 2024.12.0 Build 467, and with the R version 4.4.1 (2024-06-14 ucrt).

Note 2: The replication was conducted on Windows 11 64-bit (build 22631). Intel Core i7-1260P CPU @ 2.10GHz (12 CPUs). 30.1 GB RAM.

Note 3: The synthdid package does not appear on CRAN but is available from https://github.com/synth-inference/synthdid

Note 4: The R package versions for this replication are as follows:

lmtest_0.9-40
zoo_1.8-12
sandwich_3.1-1
plotrix_3.8-4     
gsynth_1.2.1
modelsummary_2.2.0
stargazer_5.2.3
knitr_1.49        
kableExtra_1.4.0
xtable_1.8-4
ggrepel_0.9.5
synthdid_0.0.9    
patchwork_1.2.0
ggpubr_0.6.0
lubridate_1.9.4
forcats_1.0.0     
stringr_1.5.1
dplyr_1.1.4
purrr_1.0.2
readr_2.1.5       
tidyr_1.3.1
tibble_3.2.1
ggplot2_3.5.1
tidyverse_2.0.0 